import { _decorator, Component, Node } from 'cc'
const { ccclass } = _decorator

@ccclass('BgScale')
export class BgScale extends Component {
  scale: number = 0 // 高度/宽度缩放比例

  setMode(scale: number, node1: Node) {
    console.log('this.node', node1 === this.node)
    this.scale = scale
    this.resize()
  }

  resize() {
    const { scale } = this
    this.node.setScale(scale, scale)
    console.log('this.node', this.node)
  }
}
